'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    // 插入搭配数据
    await queryInterface.bulkInsert('outfits', [
      {
        id: 1,
        user_id: 1,
        name: '商务休闲',
        description: '适合工作和日常的经典搭配',
        style: 'business',
        occasion: JSON.stringify(['工作', '约会', '日常']),
        season: 'all',
        weather: JSON.stringify(['晴天', '阴天']),
        color_scheme: JSON.stringify(['白色', '蓝色', '棕色']),
        main_image: '',
        images: JSON.stringify([]),
        rating: 4.5,
        wear_count: 8,
        last_worn_date: new Date('2024-01-15'),
        is_favorite: true,
        is_public: false,
        tags: JSON.stringify(['商务', '休闲', '经典']),
        notes: '经典的商务休闲搭配，适合多种场合',
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 2,
        user_id: 1,
        name: '周末出游',
        description: '轻松舒适的周末穿搭',
        style: 'casual',
        occasion: JSON.stringify(['日常', '聚会', '约会']),
        season: 'spring',
        weather: JSON.stringify(['晴天', '微风']),
        color_scheme: JSON.stringify(['白色', '蓝色']),
        main_image: '',
        images: JSON.stringify([]),
        rating: 4.0,
        wear_count: 5,
        last_worn_date: new Date('2024-01-10'),
        is_favorite: false,
        is_public: false,
        tags: JSON.stringify(['休闲', '舒适', '春季']),
        notes: '舒适的休闲搭配，适合周末外出',
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 3,
        user_id: 1,
        name: '正式场合',
        description: '正式商务场合的专业搭配',
        style: 'formal',
        occasion: JSON.stringify(['工作', '会议', '商务']),
        season: 'all',
        weather: JSON.stringify(['室内']),
        color_scheme: JSON.stringify(['黑色', '白色']),
        main_image: '',
        images: JSON.stringify([]),
        rating: 5.0,
        wear_count: 3,
        last_worn_date: new Date('2024-01-08'),
        is_favorite: true,
        is_public: false,
        tags: JSON.stringify(['正式', '商务', '专业']),
        notes: '正式商务场合的完美选择',
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 4,
        user_id: 1,
        name: '运动休闲',
        description: '运动和休闲兼顾的舒适搭配',
        style: 'sport',
        occasion: JSON.stringify(['运动', '日常', '休闲']),
        season: 'all',
        weather: JSON.stringify(['晴天', '室内']),
        color_scheme: JSON.stringify(['白色', '黑色']),
        main_image: '',
        images: JSON.stringify([]),
        rating: 4.2,
        wear_count: 12,
        last_worn_date: new Date('2024-01-12'),
        is_favorite: false,
        is_public: false,
        tags: JSON.stringify(['运动', '休闲', '舒适']),
        notes: '运动和日常都很适合的搭配',
        created_at: new Date(),
        updated_at: new Date(),
      },
      {
        id: 5,
        user_id: 1,
        name: '秋日温暖',
        description: '秋季温暖舒适的搭配',
        style: 'casual',
        occasion: JSON.stringify(['日常', '约会', '聚会']),
        season: 'autumn',
        weather: JSON.stringify(['凉爽', '微风']),
        color_scheme: JSON.stringify(['灰色', '米色']),
        main_image: '',
        images: JSON.stringify([]),
        rating: 4.3,
        wear_count: 6,
        last_worn_date: new Date('2024-01-05'),
        is_favorite: true,
        is_public: false,
        tags: JSON.stringify(['秋季', '温暖', '舒适']),
        notes: '秋季的温暖搭配，层次丰富',
        created_at: new Date(),
        updated_at: new Date(),
      },
    ]);
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.bulkDelete('outfits', null, {});
  },
};
